import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

/**
 * 线性布局
 */

class RowColumnWidget extends StatelessWidget {
  RowColumnWidget({
    Key ?key,
    @required this.text,
  }) : super(key: key);
  final String ?text;

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new Scaffold(
        appBar: AppBar(
          title: Text(text??""),
        ),
        body: Container(
          padding: EdgeInsets.only(left: 28.0, top: 80.0, right: 28.0),
          child: Column(children: [
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                Text(" hello world "),
                Text(" I am Jack "),
              ],
            ),
            SizedBox(
              height: 30,
            ),
            Row(
              mainAxisSize: MainAxisSize.min, //相当于wrap_content
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                Text(" hello world "),
                Text(" I am Jack "),
              ],
            ),
            SizedBox(
              height: 30,
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.end,
              textDirection: TextDirection.rtl, //倒序排列
              children: <Widget>[
                Text(" hello world "),
                Text(" I am Jack "),
              ],
            ),
            SizedBox(
              height: 30,
            ),
            Row(
              crossAxisAlignment: CrossAxisAlignment.center,
              verticalDirection: VerticalDirection.up, //从底部开始向上倒序排列。
              children: <Widget>[
                Text(
                  " hello world ",
                  style: TextStyle(fontSize: 30.0),
                ),
                Text(" I am Jack "),
              ],
            ),
          ]),
        ));
  }
}
